{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Bayesian data analysis\n",
    "##  Chapter 6, demo 4\n",
    "\n",
    "Posterior predictive checking  \n",
    "Light speed example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from scipy import stats\n",
    "\n",
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import os, sys\n",
    "# add utilities directory to path\n",
    "util_path = os.path.abspath(os.path.join(os.path.pardir, 'utilities_and_data'))\n",
    "if util_path not in sys.path and os.path.exists(util_path):\n",
    "    sys.path.insert(0, util_path)\n",
    "\n",
    "# import from utilities\n",
    "import plot_tools"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# edit default plot settings\n",
    "plt.rc('font', size=12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# data\n",
    "data_path = os.path.abspath(\n",
    "    os.path.join(\n",
    "        os.path.pardir,\n",
    "        'utilities_and_data',\n",
    "        'light.txt'\n",
    "    )\n",
    ")\n",
    "y = np.loadtxt(data_path)\n",
    "# sufficient statistics\n",
    "n = len(y)\n",
    "s2 = np.var(y, ddof=1)\n",
    "my = np.mean(y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# tail area probabilities of marginal predictive distributions\n",
    "Ty = stats.t.cdf(y, n-1, loc=my, scale=np.sqrt(s2*(1+1/n)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSU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0uzwTYTUsqJ0UtdfAnYNyK2iogXkffWvz0B\nZZxsOuXmjIiYPtyM3QT4RsCytmFPAi8eZNon26bbaAq1g/dSF01zyHV92TiUqV+6rouIOBpYO6U0\nbyIK1ge9bBdbA+8iNx9sA9wP/MO4lm5i9VIX9wEPAEvKPDsDHxvX0k1OnXIThs+VrgJ8ObBx27CN\ngae6mHZjYHkqvwumgF7qAsgHMsht4UemlJ4dx7JNtK7qIiI2BM4H/nyCytUPvWwXzwDzUkq3ppRW\nkts694mITca5jBOll7q4CFiPfCxgQ+AbrJl74J1yE4bIlZZuAvxeYFpE7NgY9io6NwfcVcYNN12t\neqkLIuJPKQcnUkpT7cyLbutiR2Am8N2IeJj8IX1JOeI+cwLKORF62S5+AjR3aKbKzk1LL3WxG7lt\n+LGyc3MhsGc50Lsm6ZSbS1NKvxl2zi4b4b9K/pm3IbAveRd/Vofp3kc+UPVS8lHlu4D39fsgwhgf\nkOi2Lo4HHgZ27neZ+1kX5B4vt2w8jiEfnd+S3KzS9/cxwdvFG8hnW+wGrANcAHy33+XvU11cBnwd\n2KTUxRnAkn6XfwzrYRqwPvBx8oHc9YFpHaY7rGTFLsAfADfSxYkRKaWuA3wz4JvACuCXwHFl+P7k\nJpLWdEH+ufxYeZxPuVx/qjx6qIv7gd+Sfx61Hpf0u/z9qIu2eQ5kip2F0mtdAO8nt/s+DlwL/GG/\ny9+PuiA3nVwJ/Bp4AvgesGe/yz+G9TCH/Aur+ZhDPvaxHNimMe2HgKXkYwGXAet18xr2hSJJlfJS\nekmqlAEuSZUywCWpUga4JFXKAJekShngklQpA1ySKmWAS1KlDHBJqtT/B4XvsEtW8WKWAAAAAElF\nTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f3d64a30198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# plot\n",
    "plt.hist(Ty, np.arange(0, 1.01, 0.05))\n",
    "plt.xlim((0, 1))\n",
    "plt.title('Light speed example\\ndistribution of marginal posterior p-values')\n",
    "plot_tools.modify_axes.only_x(plt.gca())"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
